\(\int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx\) [547]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 27, antiderivative size = 47 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\log (\sin (c+d x))}{a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {\sin ^2(c+d x)}{2 a^2 d} \]

[Out]

ln(sin(d*x+c))/a^2/d-2*sin(d*x+c)/a^2/d+1/2*sin(d*x+c)^2/a^2/d

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2915, 12, 45} \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\sin ^2(c+d x)}{2 a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {\log (\sin (c+d x))}{a^2 d} \]

[In]

Int[(Cos[c + d*x]^4*Cot[c + d*x])/(a + a*Sin[c + d*x])^2,x]

[Out]

Log[Sin[c + d*x]]/(a^2*d) - (2*Sin[c + d*x])/(a^2*d) + Sin[c + d*x]^2/(2*a^2*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {a (a-x)^2}{x} \, dx,x,a \sin (c+d x)\right )}{a^5 d} \\ & = \frac {\text {Subst}\left (\int \frac {(a-x)^2}{x} \, dx,x,a \sin (c+d x)\right )}{a^4 d} \\ & = \frac {\text {Subst}\left (\int \left (-2 a+\frac {a^2}{x}+x\right ) \, dx,x,a \sin (c+d x)\right )}{a^4 d} \\ & = \frac {\log (\sin (c+d x))}{a^2 d}-\frac {2 \sin (c+d x)}{a^2 d}+\frac {\sin ^2(c+d x)}{2 a^2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.77 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {2 \log (\sin (c+d x))-4 \sin (c+d x)+\sin ^2(c+d x)}{2 a^2 d} \]

[In]

Integrate[(Cos[c + d*x]^4*Cot[c + d*x])/(a + a*Sin[c + d*x])^2,x]

[Out]

(2*Log[Sin[c + d*x]] - 4*Sin[c + d*x] + Sin[c + d*x]^2)/(2*a^2*d)

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.72

method result size
derivativedivides \(\frac {\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-2 \sin \left (d x +c \right )+\ln \left (\sin \left (d x +c \right )\right )}{d \,a^{2}}\) \(34\)
default \(\frac {\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-2 \sin \left (d x +c \right )+\ln \left (\sin \left (d x +c \right )\right )}{d \,a^{2}}\) \(34\)
parallelrisch \(\frac {4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-4 \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1-\cos \left (2 d x +2 c \right )-8 \sin \left (d x +c \right )}{4 d \,a^{2}}\) \(56\)
risch \(-\frac {i x}{a^{2}}-\frac {{\mathrm e}^{2 i \left (d x +c \right )}}{8 d \,a^{2}}-\frac {{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d \,a^{2}}-\frac {2 i c}{d \,a^{2}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d \,a^{2}}-\frac {2 \sin \left (d x +c \right )}{a^{2} d}\) \(86\)
norman \(\frac {-\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}-\frac {4 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {10 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {10 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {18 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {18 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {30 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {30 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {34 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {34 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}-\frac {\ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) \(262\)

[In]

int(cos(d*x+c)^5*csc(d*x+c)/(a+a*sin(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d/a^2*(1/2*sin(d*x+c)^2-2*sin(d*x+c)+ln(sin(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.77 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\cos \left (d x + c\right )^{2} - 2 \, \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 4 \, \sin \left (d x + c\right )}{2 \, a^{2} d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/2*(cos(d*x + c)^2 - 2*log(1/2*sin(d*x + c)) + 4*sin(d*x + c))/(a^2*d)

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**5*csc(d*x+c)/(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.83 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {\sin \left (d x + c\right )^{2} - 4 \, \sin \left (d x + c\right )}{a^{2}} + \frac {2 \, \log \left (\sin \left (d x + c\right )\right )}{a^{2}}}{2 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

1/2*((sin(d*x + c)^2 - 4*sin(d*x + c))/a^2 + 2*log(sin(d*x + c))/a^2)/d

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {2 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{2} - 4 \, a^{2} \sin \left (d x + c\right )}{a^{4}}}{2 \, d} \]

[In]

integrate(cos(d*x+c)^5*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/2*(2*log(abs(sin(d*x + c)))/a^2 + (a^2*sin(d*x + c)^2 - 4*a^2*sin(d*x + c))/a^4)/d

Mupad [B] (verification not implemented)

Time = 9.80 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.55 \[ \int \frac {\cos ^4(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a^2\,d}-\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )} \]

[In]

int(cos(c + d*x)^5/(sin(c + d*x)*(a + a*sin(c + d*x))^2),x)

[Out]

log(tan(c/2 + (d*x)/2))/(a^2*d) - log(tan(c/2 + (d*x)/2)^2 + 1)/(a^2*d) - (4*tan(c/2 + (d*x)/2) - 2*tan(c/2 +
(d*x)/2)^2 + 4*tan(c/2 + (d*x)/2)^3)/(d*(2*a^2*tan(c/2 + (d*x)/2)^2 + a^2*tan(c/2 + (d*x)/2)^4 + a^2))